﻿CREATE TABLE [dbo].[Company]
(
	[CompanyId] INT NOT NULL PRIMARY KEY IDENTITY, 
    [CompanyName] NVARCHAR(50) NULL, 
    [Address] NVARCHAR(200) NULL, 
    [City] NVARCHAR(50) NULL, 
    [ZipCode] INT NULL, 
    [Product] NVARCHAR(50) NULL, 
    [Industry] NVARCHAR(50) NULL, 
    [EmployeeCount] INT NULL, 
    [LastSales] DECIMAL(18, 2) NULL, 
    [WebSite] NVARCHAR(200) NULL, 
    [CompanyPhone] NVARCHAR(50) NULL, 
    [CompanyFax] NVARCHAR(50) NULL, 
    [LicenseData] TEXT NULL, 
    [Email] NVARCHAR(50) NULL, 
    [UserId] INT NULL
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'公司编号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'CompanyId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'公司名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'CompanyName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'公司地址',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'Address'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'城市',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'City'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'邮编',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'ZipCode'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'主营产品',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'Product'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'擅长行业',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'Industry'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'员工数量',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'EmployeeCount'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'去年销售额',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'LastSales'
GO

EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'网址',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'WebSite'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'公司电话',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'CompanyPhone'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'公司传真',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'CompanyFax'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'营业执照资料',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'LicenseData'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'公司邮箱',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Company',
    @level2type = N'COLUMN',
    @level2name = N'Email'